<html>
<head>
    <script src="resources/cross-frame-access.js"></script>
    <script>
        if (window.testRunner) {
            testRunner.dumpAsText();
            testRunner.dumpChildFrames();
            testRunner.waitUntilDone();
        }

        receiver = function(e)
        {
            if (e.data == "setValuesComplete")
                deleteTest();
        }
        addEventListener('message', receiver, false);

        deleteTest = function()
        {
            targetWindow = frames[0];

            shouldBeTrue("deletionThrowsException('targetWindow.existingProperty')");
            shouldBeTrue("deletionThrowsException('targetWindow[1]')");
            shouldBeTrue("deletionThrowsException('targetWindow.location.existingProperty')");
            shouldBeTrue("deletionThrowsException('targetWindow.location[1]')", "false");

            targetWindow.postMessage("deletingValuesComplete", "*");
        }
    </script>
</head>
<body>
    <iframe src="http://localhost:8000/security/resources/cross-frame-iframe-for-delete-test.html"></iframe>
    <pre id="console"></pre>
</body>
</html>
